/**
 * Generate time : 2011-06-20 16:46:08
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ca.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.StringUtils;

/**
 * VZMCA03
 * 
 */
public class VZMCA03 extends DaoEPBase {

	private Double fdPlanMine = new Double(0);
	private Double fdActualSum = new Double(0);
	private Double fdPlanGrub = new Double(0);
	private Double fdPlanDeploitation = new Double(0);
	private Double fdPlanProjectNum = new Double(0);
	private Long fdPlanType = new Long(0);
	private String fdPlanYear = " ";
	private String fdPlanMonth = " ";
	private String fdWorkface = " ";
	private String fdDepartmentName = " ";
	private String fdDepartmentId = " ";
	private String fdDepartmentLevel = " ";
	private String fdParentDepartmentId = " ";
	private String fdProjectName = " ";
	private String fdProjectId = " ";

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdActualSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanMine");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanGrub");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanDeploitation");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanProjectNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanType");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanYear");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanMonth");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdWorkface");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentName");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentLevel");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentDepartmentId");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProjectName");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProjectId");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public VZMCA03() {
		initMetaData();
	}

	/**
	 * get the fdActualSum
	 * 
	 * @return the fdActualSum
	 */
	public Double getFdActualSum() {
		return this.fdActualSum;
	}

	/**
	 * set the fdActualSum
	 */
	public void setFdActualSum(Double fdActualSum) {
		this.fdActualSum = fdActualSum;
	}

	/**
	 * get the fdPlanMine
	 * 
	 * @return the fdPlanMine
	 */
	public Double getFdPlanMine() {
		return this.fdPlanMine;
	}

	/**
	 * set the fdPlanMine
	 */
	public void setFdPlanMine(Double fdPlanMine) {
		this.fdPlanMine = fdPlanMine;
	}

	/**
	 * get the fdPlanGrub
	 * 
	 * @return the fdPlanGrub
	 */
	public Double getFdPlanGrub() {
		return this.fdPlanGrub;
	}

	/**
	 * set the fdPlanGrub
	 */
	public void setFdPlanGrub(Double fdPlanGrub) {
		this.fdPlanGrub = fdPlanGrub;
	}

	/**
	 * get the fdPlanDeploitation
	 * 
	 * @return the fdPlanDeploitation
	 */
	public Double getFdPlanDeploitation() {
		return this.fdPlanDeploitation;
	}

	/**
	 * set the fdPlanDeploitation
	 */
	public void setFdPlanDeploitation(Double fdPlanDeploitation) {
		this.fdPlanDeploitation = fdPlanDeploitation;
	}

	/**
	 * get the fdPlanProjectNum
	 * 
	 * @return the fdPlanProjectNum
	 */
	public Double getFdPlanProjectNum() {
		return this.fdPlanProjectNum;
	}

	/**
	 * set the fdPlanProjectNum
	 */
	public void setFdPlanProjectNum(Double fdPlanProjectNum) {
		this.fdPlanProjectNum = fdPlanProjectNum;
	}

	/**
	 * get the fdPlanType
	 * 
	 * @return the fdPlanType
	 */
	public Long getFdPlanType() {
		return this.fdPlanType;
	}

	/**
	 * set the fdPlanType
	 */
	public void setFdPlanType(Long fdPlanType) {
		this.fdPlanType = fdPlanType;
	}

	/**
	 * get the fdPlanYear
	 * 
	 * @return the fdPlanYear
	 */
	public String getFdPlanYear() {
		return this.fdPlanYear;
	}

	/**
	 * set the fdPlanYear
	 */
	public void setFdPlanYear(String fdPlanYear) {
		this.fdPlanYear = fdPlanYear;
	}

	/**
	 * get the fdPlanMonth
	 * 
	 * @return the fdPlanMonth
	 */
	public String getFdPlanMonth() {
		return this.fdPlanMonth;
	}

	/**
	 * set the fdPlanMonth
	 */
	public void setFdPlanMonth(String fdPlanMonth) {
		this.fdPlanMonth = fdPlanMonth;
	}

	/**
	 * get the fdWorkface
	 * 
	 * @return the fdWorkface
	 */
	public String getFdWorkface() {
		return this.fdWorkface;
	}

	/**
	 * set the fdWorkface
	 */
	public void setFdWorkface(String fdWorkface) {
		this.fdWorkface = fdWorkface;
	}

	/**
	 * set the fdDepartmentName
	 */
	public void setFdDepartmentName(String fdDepartmentName) {
		this.fdDepartmentName = fdDepartmentName;
	}

	/**
	 * get the fdDepartmentLevel
	 * 
	 * @return the fdDepartmentLevel
	 */
	public String getFdWDepartmentName() {
		return this.fdDepartmentName;
	}

	/**
	 * get the fdDepartmentId
	 * 
	 * @return the fdDepartmentId
	 */
	public String getfdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId
	 */
	public void setfdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * set the fdDepartmentLevel
	 */
	public void setFdDepartmentLevel(String fdDepartmentLevel) {
		this.fdDepartmentLevel = fdDepartmentLevel;
	}

	/**
	 * get the fdDepartmentLevel
	 * 
	 * @return the fdDepartmentLevel
	 */
	public String getFdDepartmentLevel() {
		return this.fdDepartmentLevel;
	}

	/**
	 * set the fdParentDepartmentId
	 */
	public void setFdParentDepartmentId(String fdParentDepartmentId) {
		this.fdParentDepartmentId = fdParentDepartmentId;
	}

	/**
	 * get the fdParentDepartmentId
	 * 
	 * @return the fdParentDepartmentId
	 */
	public String getFdParentDepartmentId() {
		return this.fdParentDepartmentId;
	}

	public void setFdProjectName(String fdProjectName) {
		this.fdProjectName = fdProjectName;
	}

	public String getFdProjectId() {
		return this.fdProjectName;
	}

	public void setFdProjectId(String fdProjectId) {
		this.fdProjectId = fdProjectId;
	}

	public String getFdProjectName() {
		return this.fdProjectId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdActualSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdActualSum")), fdActualSum));
		setFdPlanMine(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanMine")), fdPlanMine));
		setFdPlanGrub(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanGrub")), fdPlanGrub));
		setFdPlanDeploitation(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanDeploitation")), fdPlanDeploitation));
		setFdPlanProjectNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanProjectNum")), fdPlanProjectNum));
		setFdPlanType(NumberUtils.toLong(StringUtils.toString(map.get("fdPlanType")), fdPlanType));
		setFdPlanYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPlanYear")), fdPlanYear));
		setFdPlanMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPlanMonth")), fdPlanMonth));
		setFdWorkface(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdWorkface")), fdWorkface));
		setFdDepartmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentName")), fdDepartmentName));
		setfdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdDepartmentLevel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentLevel")), fdDepartmentLevel));
		setFdParentDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentDepartmentId")), fdParentDepartmentId));
		setFdProjectId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectId")), fdProjectId));
		setFdProjectName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectName")), fdProjectName));

	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();

		map.put("fdActualSum", StringUtils.toString(fdActualSum, eiMetadata.getMeta("fdActualSum")));
		map.put("fdPlanMine", StringUtils.toString(fdPlanMine, eiMetadata.getMeta("fdPlanMine")));
		map.put("fdPlanGrub", StringUtils.toString(fdPlanGrub, eiMetadata.getMeta("fdPlanGrub")));
		map.put("fdPlanDeploitation", StringUtils.toString(fdPlanDeploitation, eiMetadata.getMeta("fdPlanDeploitation")));
		map.put("fdPlanProjectNum", StringUtils.toString(fdPlanProjectNum, eiMetadata.getMeta("fdPlanProjectNum")));
		map.put("fdPlanType", StringUtils.toString(fdPlanType, eiMetadata.getMeta("fdPlanType")));
		map.put("fdPlanYear", StringUtils.toString(fdPlanYear, eiMetadata.getMeta("fdPlanYear")));
		map.put("fdPlanMonth", StringUtils.toString(fdPlanMonth, eiMetadata.getMeta("fdPlanMonth")));
		map.put("fdWorkface", StringUtils.toString(fdWorkface, eiMetadata.getMeta("fdWorkface")));
		map.put("fdDepartmentName", StringUtils.toString(fdDepartmentName, eiMetadata.getMeta("fdDepartmentName")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdDepartmentLevel", StringUtils.toString(fdDepartmentLevel, eiMetadata.getMeta("fdDepartmentLevel")));
		map.put("fdParentDepartmentId", StringUtils.toString(fdParentDepartmentId, eiMetadata.getMeta("fdParentDepartmentId")));
		map.put("fdProjectName", StringUtils.toString(fdProjectName, eiMetadata.getMeta("fdProjectName")));
		map.put("fdProjectId", StringUtils.toString(fdProjectId, eiMetadata.getMeta("fdProjectId")));
		return map;

	}
}